package com.icost.directive.repository;

import com.icost.directive.entity.ActivationCode;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.Optional;
public interface ActivationCodeRepository extends JpaRepository<ActivationCode, Long> {
    Optional<ActivationCode> findByCodeAndUsedFalse(String code);
    Optional<ActivationCode> findFirstByUsedFalse();
    Optional<ActivationCode> findByCode(String code);
}
